{template '_header'}
{template 'commission/common'}
<div class="fui-page fui-page-current page-commission-order">
    <div class="fui-header">
        <div class="fui-header-left">
            <a class="back"></a>
        </div>
        <div class="title">{php echo $this->set['texts']['order']}</div>
		 
    </div>
    <div class="fui-content navbar">
        <div class='fui-cell-group' style='margin-top:0px;background: #fea23d;color: #fff;'>
            <div class='fui-cell'>
                <div class='fui-cell-info' style='width:auto;color: #fff;'>{php echo $this->set['texts']['commission_total']}：+{php echo number_format($member['commission_total'],2)}{php echo $this->set['texts']['yuan']}</div>
            </div>
        </div>
        <div class="fui-tab fui-tab-warning" id="tab">
            <a class="active" data-tab='status'>所有</a>
            <a href="javascript:void(0)" data-tab='status0'>待付款</a>
            <a href="javascript:void(0)" data-tab='status1'>已付款</a>
            <a href="javascript:void(0)" data-tab='status3'>已完成</a>
        </div>

        <div class='content-empty' style='display:none;'>
            <i class='icon icon-list'></i><br/>暂时没有任何订单
        </div>
        <div  id="container"></div>
        <div class='infinite-loading'><span class='fui-preloader'></span><span class='text'> 正在加载...</span></div>
   </div>
</div>

<script id='tpl_commission_order_list' type='text/html'>
    <%each list as order%>
    <!--<div class='fui-according'>-->
        <!--<div class='fui-according-header'>-->
                    <!--<span class="left"><%order.ordersn%>{if !p('offic')}(<%order.level%>){/if}<br>-->
                        <!--<span><%order.createtime%></span>-->
                    <!--</span>-->
            <!--<span class="right">+<%order.commission%><br><span><%order.status%></span></span>-->
            <!--{if !empty($this->set['openorderdetail']) || !empty($this->set['openorderbuyer'])}-->
            <!--<span class="remark"></span>-->
            <!--{/if}-->
        <!--</div>-->
        <!--{if !empty($this->set['openorderdetail']) || !empty($this->set['openorderbuyer'])}-->
        <!--<div class='fui-according-content'>-->
            <!--<div class='content-block'>-->
                <!--{if !empty($this->set['openorderbuyer'])}-->
                <!--<div class="fui-list">-->
                    <!--<div class="fui-list-media">-->
                        <!--<img src="<%order.buyer.avatar%>" class="round" style='width:2rem;height:2rem;'>-->
                        <!--&lt;!&ndash;<div class="badge">1</div>&ndash;&gt;-->
                    <!--</div>-->
                    <!--<div class="fui-list-inner">-->
                        <!--<div class="row">-->
                            <!--<div class="row-text" style="font-size: 15px"><%order.buyer.nickname%></div>-->
                        <!--</div>-->
                        <!--<div class="subtitle" style="font-size: 15px">微信号: <%order.buyer.weixin%></div>-->
                    <!--</div>-->
                <!--</div>-->
                <!--{/if}-->
                <!--{if !empty($this->set['openorderdetail'])}-->
                <!--<%each order.order_goods as g%>-->
                <!--<div class="fui-list">-->
                    <!--<div class="fui-list-media">-->
                        <!--<img src="<%g.thumb%>" class="round" style='width:2rem;height:2rem;'>-->
                    <!--</div>-->
                    <!--<div class="fui-list-inner">-->
                        <!--<div class="row">-->
                            <!--<div class="row-text" style="font-size: 14px"><%g.title%></div>-->
                        <!--</div>-->
                        <!--<div class="subtitle" style="font-size: 14px"><%g.optionname%>x<%g.total%></div>-->
                    <!--</div>-->
                    <!--<div class="row-remark">-->
                        <!--<p>预计</p>-->
                        <!--<p>+<%g.commission%></p>-->
                    <!--</div>-->
                <!--</div>-->
                <!--<%/each%>-->
                <!--{/if}-->
            <!--</div>-->
        <!--</div>-->
        <!--{/if}-->
    <!--</div>-->
    <div class='fui-list-group'>

        {if !empty($this->set['openorderdetail']) || !empty($this->set['openorderbuyer'])}
                {if !empty($this->set['openorderbuyer'])}
                <div class="fui-list" style="height: 2.4rem">
                    <div class="fui-list-media">
                        <img src="<%order.buyer.avatar%>" class="round" style='width:1.4rem;height:1.4rem;border-radius: 50%'>
                        <!--<div class="badge">1</div>-->
                    </div>
                    <div class="fui-list-inner">
                        <div class="row">
                            <div class="row-text" style="font-size: .6rem"><%order.buyer.nickname%></div>
                        </div>
                        <!--<div class="subtitle" style="font-size: 15px">微信号: <%order.buyer.weixin%></div>-->
                    </div>
                    <div class="fui-list-angle" style="margin: 0;font-size: .6rem; <%if order.status==1%>color:#ff8000;<%else if order.status==0%>color:#ff5555;<%else if order.status==3%>color:#04ab02;<%else%>color:#b2b2b2;<%/if%>"><%order.statusstr%></div>
                </div>
                {/if}
                {if !empty($this->set['openorderdetail'])}
                <%each order.order_goods as g%>
                <div class="fui-list no-border" style="background: #f9f9f9;height: 3.25rem;margin-top: .1rem">
                    <div class="fui-list-media">
                        <img src="<%g.thumb%>" class="round" style='width:2.5rem;height:2.5rem;'>
                    </div>
                    <div class="fui-list-inner">
                        <div class="row">
                            <div class="row-text" style="font-size: .6rem;color: #000"><%g.title%></div>
                        </div>
                        <div class="subtitle" style="font-size: .6rem;color: #999;"><%g.optionname%>x<%g.total%></div>
                    </div>
                    <div class="row-remark">
                        <p>预计</p>
                        <p>+<%g.commission%></p>
                    </div>
                </div>
                <%/each%>
                {/if}
        {/if}
        <div class='fui-list'>
                    <span class="left" style="font-size: .55rem;color: #999;line-height: .95rem">{if !p('offic')}分销等级：<%order.level%>{/if}<br>订单编号：<%order.ordersn%><br>下单时间：<%order.createtime%>
                    </span>
            <!--<span class="right">+<%order.commission%><br><span><%order.status%></span></span>-->
            <!--{if !empty($this->set['openorderdetail']) || !empty($this->set['openorderbuyer'])}-->
            <!--<span class="remark"></span>-->
            <!--{/if}-->
        </div>
        <div class='fui-list' style="font-size: .55rem;justify-content: flex-end;border-top: .025rem solid #ebebeb;">
            预计{php echo $this->set['texts']['commission']}：<span class="right" style="font-size: .8rem">+<%order.commission%></span>
        </div>
    </div>
    <%/each%>
</script>

<script language='javascript'>
    require(['../addons/ewei_shopv2/plugin/commission/static/js/order.js'], function (modal) {
    modal.init({fromDetail:false});
});
</script>
{php $this->footerMenus()}
{template '_footer'}
